<template>
	<view>
		<navbar title="京东好物"  color="#fff" :bgColor="`url('${imgs.navbar.jd}')`"></navbar>
		<div :style="{background:`url('${imgs.navbar.jd}')`,height:'26rpx'}" >
		<div v-if="list.length" >
			<good :good="item" v-for="item in list" :key="item" ></good>
		</div>
		<div v-else style="padding-top: 100rpx;">
			<u-empty margin-top="50rpx" mode="list"></u-empty>
		</div>
	</div>
	</view> 
</template>

<script>
	import navbar from '../components/w-navbar/index.vue'
	import good from '@/components/good/index.vue'
	import imgs from '@/utils/imgs.js'
	export default {
		data() {
			return {
				imgs,
				list:[], 
				page:1
			}
		},
		components:{
			navbar,good
		},
		methods: {
			async getList(){
				const res = await this.$api.youApi.list({
					page:this.page,
					type:3
				})
				this.list = res.data.goods||[]
			}
		},
		onLoad() {
			this.getList()
		}
	}
</script>

<style>

</style>
